package layout

import android.widget.ImageView
import androidx.recyclerview.widget.LinearLayoutManager
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.haiheng.bookmusic.utils.GlideUtils
import com.haiheng.voiceandbook.R
import com.ximalaya.ting.android.opensdk.model.album.Album

class AlbumAdapter(layoutResId: Int, data: List<Album>?) :
    BaseQuickAdapter<Album, BaseViewHolder>(layoutResId, data) {
    private val TAG = "AlbumAdapter"

    override fun convert(helper: BaseViewHolder?, item: Album?) {
        helper?.run {
            setText(R.id.name, item?.albumTitle)
            val imageView = getView<ImageView>(R.id.imageView)
            GlideUtils.load(mContext, item!!.coverUrlLarge,imageView)
        }


    }


}